package com.csot.ry.service.impl;

import java.util.List;
import com.csot.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.csot.ry.mapper.TAssetIdleIpMapper;
import com.csot.ry.domain.TAssetIdleIp;
import com.csot.ry.service.ITAssetIdleIpService;

/**
 * 资产空闲ipService业务层处理
 * 
 * @author csot
 * @date 2025-07-12
 */
@Service
public class TAssetIdleIpServiceImpl implements ITAssetIdleIpService 
{
    @Autowired
    private TAssetIdleIpMapper tAssetIdleIpMapper;

    /**
     * 查询资产空闲ip
     * 
     * @param id 资产空闲ip主键
     * @return 资产空闲ip
     */
    @Override
    public TAssetIdleIp selectTAssetIdleIpById(Long id)
    {
        return tAssetIdleIpMapper.selectTAssetIdleIpById(id);
    }

    /**
     * 查询资产空闲ip列表
     * 
     * @param tAssetIdleIp 资产空闲ip
     * @return 资产空闲ip
     */
    @Override
    public List<TAssetIdleIp> selectTAssetIdleIpList(TAssetIdleIp tAssetIdleIp)
    {
        return tAssetIdleIpMapper.selectTAssetIdleIpList(tAssetIdleIp);
    }

    /**
     * 新增资产空闲ip
     * 
     * @param tAssetIdleIp 资产空闲ip
     * @return 结果
     */
    @Override
    public int insertTAssetIdleIp(TAssetIdleIp tAssetIdleIp)
    {
        tAssetIdleIp.setCreateTime(DateUtils.getNowDate());
        return tAssetIdleIpMapper.insertTAssetIdleIp(tAssetIdleIp);
    }

    /**
     * 修改资产空闲ip
     * 
     * @param tAssetIdleIp 资产空闲ip
     * @return 结果
     */
    @Override
    public int updateTAssetIdleIp(TAssetIdleIp tAssetIdleIp)
    {
        tAssetIdleIp.setUpdateTime(DateUtils.getNowDate());
        return tAssetIdleIpMapper.updateTAssetIdleIp(tAssetIdleIp);
    }

    /**
     * 批量删除资产空闲ip
     * 
     * @param ids 需要删除的资产空闲ip主键
     * @return 结果
     */
    @Override
    public int deleteTAssetIdleIpByIds(Long[] ids)
    {
        return tAssetIdleIpMapper.deleteTAssetIdleIpByIds(ids);
    }

    /**
     * 删除资产空闲ip信息
     * 
     * @param id 资产空闲ip主键
     * @return 结果
     */
    @Override
    public int deleteTAssetIdleIpById(Long id)
    {
        return tAssetIdleIpMapper.deleteTAssetIdleIpById(id);
    }
}
